package easy;

import java.util.ArrayList;
import java.util.List;

public class Solution_412 {

    public List<String> fizzBuzz(int n) {
        int mod = 0;
        List<String> list = new ArrayList<>(n+1);
        for (int i = 1; i <= n; i++) {
            mod++;
            if (mod==15) {
                list.add("FizzBuzz");
                mod = 0;
            } else if (mod%3==0){
                list.add("Fizz");
            } else if (mod%5==0){
                list.add("Buzz");
            } else {
                list.add(String.valueOf(i));
            }
        }
        return list;
    }

    public static void main(String[] args) {
        Solution_412 model = new Solution_412();
        List<String> strings = model.fizzBuzz(15);
        System.out.println(strings);
    }
}
